package com.kedacom.freedomLabel.utils.validator;

import android.content.Context;

import com.kedacom.lego.fast.util.ToastUtil;
import com.kedacom.lego.fast.view.notice.INotice;
import com.seray.scaleviewlib.utils.Utils;

/**
 * @author licheng
 * @since 2020/2/2 12:13
 */
public abstract class ValidationExecutor {

    private String message;

    public ValidationExecutor(String message) {
        this.message = message;
    }

    String getMessage() {
        return this.message;
    }

    public abstract boolean doValidate(Context context, String text);

    void showToast(String message) {
        ToastUtil.showFilteredToast(Utils.getApp(), message, INotice.TOAST_WARNING);
    }
}